<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		

<style>
	
	.upload{
		width: 200px;
		height: 100px;
	}
	
</style>

	</head>
<!--上传组件 css-->
<link type="text/css" rel="stylesheet" href="http://base1.zhihuishu.com/able-commons/resources/cdn/letvuploader/0.1/fineuploader-4.1.0.css">
<link type="text/css" rel="stylesheet" href="http://base1.zhihuishu.com/able-commons/resources/cdn/letvuploader/0.1/reset.css"/>
<link type="text/css" rel="stylesheet" href="http://base1.zhihuishu.com/able-commons/resources/uploader/test/aspupload/css/aspupload/aspupload.css"/>

<!-- 上传组件 js-->

<script type="text/javascript" src="http://base1.zhihuishu.com/able-commons/resources/uploader/client/js/jquery/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="http://base1.zhihuishu.com/able-commons/resources/cdn/ableuploader/0.2/jquery.fineuploader-4.1.0.js"></script>
<script type="text/javascript" src="http://base1.zhihuishu.com/able-commons/resources/cdn/ableuploader/0.2/ableuploader2.js"></script>
<script type="text/javascript" src="http://base1.zhihuishu.com/able-commons/resources/cdn/ableuploader/0.2/jquery-ui-1.9.1.custom.min.js"></script>
<script type="text/javascript" src="http://base1.zhihuishu.com/able-commons/resources/uploader/client/fineuploader.js"></script>
<script type="text/javascript" src="http://base1.zhihuishu.com/able-commons/resources/cdn/letvuploader/0.1/swfupload.js"></script>
<script type="text/javascript" src="http://base1.zhihuishu.com/able-commons/resources/uploader/client/swfupload/swfupload.queue.js"></script>
<script type="text/javascript" src="http://base1.zhihuishu.com/able-commons/resources/uploader/client/swfupload/swfupload.speed.js"></script>
<script type="text/javascript" src="http://base1.zhihuishu.com/able-commons/resources/cdn/ableuploader/0.2/handlers_01.js"></script>
<script type="text/javascript" src="http://base1.zhihuishu.com/able-commons/resources/cdn/ableuploader/0.2/html5upload2.js"></script>

	<body>
		
		<a class="upload" id="uploadSubtitle">上传字幕</a>
		
	</body>
</html>



<script >
	
$(function(){
		
	
});

var dataParamTest=function(){
	
	return{
		
			appName : "ablecommons",//对应应用名称
			//modelName : "image",//可不写，按文件类型命名，视频为video、图片为image、其他文件为file
			userId : "42", //填写用户ID
			userName : "test",
			fileType : "image", //上传文件类型三类： image; video; file;
			smallImgSize : "100:100", //图片或者视频的三种裁图大小
			bigImgSize : "400:488",
			middleImgSize : "260:250",
			autoConvert : "true", //true为自动转换，false或者不配置为不自动转换(上传里需要自带文档转换,Flex上传不需要自带转换.)
			vIsUploadLetv : "true", //是否将视频上传到乐视
			oldFileUrl : "", //myuni/image/674/ca24fb63-1c98-4865-a1b0-fa76fb909d07.jpg
			targetId : "uploadSubtitle", //为按钮目标标签ID
			buttonWidth : "120", //IE789下设置此按钮宽度生效
			buttonHeight : "100",
			showProgress : "true", //是否显示任务栏进度条
			multipleUpload : "false",
			buttonText : "上传",
			buttonClass : "btnStyle_ac greenBtnSty03_width120",    
			//buttonTextStyle: "{ font-size: 12; color: #FFFFFF; display:inline-block;width:50;height:32;text-align:center; font-family: 'Microsoft YaHei';  }", // 按钮文字样式定义
			buttonTextStyle : "{ font-size: 14; color: #FFFFFF; display:inline-block;width:120;height:35;text-align:center; font-family: 'Microsoft YaHei';  }", // 按钮文字样式定义
			allowSuffix : "",//自定义限制后缀
			videoConvert : "true",
			host :"http://base1.zhihuishu.com/able-commons/"
	}
}

//1.传入所需参数返回所需API
var _uploadAllTestDemo = dataParamTest();
//2.回调函数（针对上传之后的数据操作和一些其他的业务处理）
_uploadAllTestDemo.callbacks = {
		
	onFileDialogStart : function(tid) {//打开模态窗体
	},
	onError : function(id, fileName, reason) {//上传错误
	},
	//选中文件 （有用）
	onUpload : function(id, fileName) {
	},
	//上传成功后  （有用）
	onComplete : function(id, fileName, responseJSON) {
		if (responseJSON != '') {
			var fileData = responseJSON.data;
			var fileUrl = fileData.filePath;
			var ids = fileData.videoId;

		}

	},
	onCancel : function(id, fileName) {//取消
	},
	onDelete : function(id) {//删除
	},
	onDeleteComplete : function(id, xhrOrXdr, isError) {//删除已经上传成功的文件
	}

}
//3.根据API、回调函数 初始化上传组件
$("#uploadSubtitle").Ableuploader(_uploadAllTestDemo);

</script>
